n = int(input())

num_l = [1,1]

if n==1:
    print("1")
elif n==2:
    print("1")
    print("1 1")
else:
    print("1")
    print("1 1")
    
    t_l = []

    for i in range(n-2):
        t_l = [1]
        for j in range(len(num_l)-1):
            t_l.append(num_l[j]+num_l[j+1])

        t_l.append(1)
        num_l = t_l[:]
        for num_idx in range(len(num_l)):
            print(num_l[num_idx],end=' ')  
        print()
    
        

